package org.metasketch.graphics.language.xml;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;

@XStreamAlias("node")
public class Node extends Styled {

	@XStreamAsAttribute
	String name;

	// Dimensions
	@XStreamAsAttribute
	String x = "0";

	@XStreamAsAttribute
	String y = "0";

	// String movableness = "freely"; // doesn't make sense right now, without
	// any more flexible and accurate constraints...
	@XStreamAsAttribute
	String sizeableness = "both"; // width height

	@XStreamAsAttribute
	boolean selectable = false; // /interactable
	// editable

	@XStreamAsAttribute
	boolean scroll = true;

	@XStreamAsAttribute
	boolean smallerThanContents = false; // true only if scroll is also true

	// styled variables - ???
	// boolean visible = false;
	// String transparency;

	// optional
	Binding binding;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getX() {
		return x;
	}

	public void setX(String x) {
		this.x = x;
	}

	public String getY() {
		return y;
	}

	public void setY(String y) {
		this.y = y;
	}

	public String getSizeableness() {
		return sizeableness;
	}

	public void setSizeableness(String sizeableness) {
		this.sizeableness = sizeableness;
	}

	public boolean isSelectable() {
		return selectable;
	}

	public void setSelectable(boolean selectable) {
		this.selectable = selectable;
	}

	public boolean isScroll() {
		return scroll;
	}

	public void setScroll(boolean scroll) {
		this.scroll = scroll;
	}

	public boolean isSmallerThanContents() {
		return smallerThanContents;
	}

	public void setSmallerThanContents(boolean smallerThanContents) {
		this.smallerThanContents = smallerThanContents;
	}

	public Binding getBinding() {
		return binding;
	}

	public void setBinding(Binding binding) {
		this.binding = binding;
	}

}
